import { DELETE_USERINFO,SAVE_USERINFO} from "../action_types";

export const saveUserinfo = (v) => {
    localStorage.setItem("user",JSON.stringify(v));
    localStorage.setItem("isLogin",true);
    return { type: SAVE_USERINFO, data: v }
};

export const deleteUserinfo = ()=>{
    localStorage.removeItem("user");
    localStorage.removeItem("isLogin");
    return {type:DELETE_USERINFO}
}